package com.household.controller.admin;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.household.domain.entity.User;
import com.household.domain.vo.AdminUserVO;
import com.household.domain.vo.BootstrapTableVO;
import com.household.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created By wanzhen
 * 2023. 2023/4/7. 22:47
 */

@RestController
@RequestMapping("/admin")
public class AdminFeignController {
    private final UserService userService;

    @Autowired
    public AdminFeignController(UserService userService) {
        this.userService = userService;
    }

    @RequestMapping("/feigin/list")
    public BootstrapTableVO<AdminUserVO> pageAdminUserController(Page<User> page,QueryWrapper<User> wrapper){
        BootstrapTableVO<AdminUserVO> vo = userService.pageAdminUserInfoVO(page, wrapper);
        return vo;
    }

}
